#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 1e5 + 5;

int n, k;
ll p[N], q[N];

int main() {
    ll p1, p2, p3;
    cin >> n >> k;

    for (int i = 1; i <= n; i++) {
        cin >> p1 >> p2 >> p3;
        p[i] = q[i] = p1 + p2 + p3;
    }


    sort(p + 1, p + 1 + n, greater<ll>());
    for (int i = 1; i <= n; i++) {
        if (q[i] + 300 >= p[k]) puts("Yes");
        else puts("No");
    }
    return 0;
}